package com.ruoyi.etp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.etp.mapper.EtpEmployeeViolationAnalysisMapper;
import com.ruoyi.etp.domain.EtpEmployeeViolationAnalysis;
import com.ruoyi.etp.service.IEtpEmployeeViolationAnalysisService;

/**
 * 员工违规分析Service业务层处理
 * 
 * @author xmj
 * @date 2025-09-12
 */
@Service
public class EtpEmployeeViolationAnalysisServiceImpl implements IEtpEmployeeViolationAnalysisService 
{
    @Autowired
    private EtpEmployeeViolationAnalysisMapper etpEmployeeViolationAnalysisMapper;

    /**
     * 查询员工违规分析
     * 
     * @param id 员工违规分析主键
     * @return 员工违规分析
     */
    @Override
    public EtpEmployeeViolationAnalysis selectEtpEmployeeViolationAnalysisById(Long id)
    {
        return etpEmployeeViolationAnalysisMapper.selectEtpEmployeeViolationAnalysisById(id);
    }

    /**
     * 查询员工违规分析列表
     * 
     * @param etpEmployeeViolationAnalysis 员工违规分析
     * @return 员工违规分析
     */
    @Override
    public List<EtpEmployeeViolationAnalysis> selectEtpEmployeeViolationAnalysisList(EtpEmployeeViolationAnalysis etpEmployeeViolationAnalysis)
    {
        return etpEmployeeViolationAnalysisMapper.selectEtpEmployeeViolationAnalysisList(etpEmployeeViolationAnalysis);
    }

    /**
     * 新增员工违规分析
     * 
     * @param etpEmployeeViolationAnalysis 员工违规分析
     * @return 结果
     */
    @Override
    public int insertEtpEmployeeViolationAnalysis(EtpEmployeeViolationAnalysis etpEmployeeViolationAnalysis)
    {
        return etpEmployeeViolationAnalysisMapper.insertEtpEmployeeViolationAnalysis(etpEmployeeViolationAnalysis);
    }

    /**
     * 修改员工违规分析
     * 
     * @param etpEmployeeViolationAnalysis 员工违规分析
     * @return 结果
     */
    @Override
    public int updateEtpEmployeeViolationAnalysis(EtpEmployeeViolationAnalysis etpEmployeeViolationAnalysis)
    {
        etpEmployeeViolationAnalysis.setUpdateTime(DateUtils.getNowDate());
        return etpEmployeeViolationAnalysisMapper.updateEtpEmployeeViolationAnalysis(etpEmployeeViolationAnalysis);
    }

    /**
     * 批量删除员工违规分析
     * 
     * @param ids 需要删除的员工违规分析主键
     * @return 结果
     */
    @Override
    public int deleteEtpEmployeeViolationAnalysisByIds(Long[] ids)
    {
        return etpEmployeeViolationAnalysisMapper.deleteEtpEmployeeViolationAnalysisByIds(ids);
    }

    /**
     * 删除员工违规分析信息
     * 
     * @param id 员工违规分析主键
     * @return 结果
     */
    @Override
    public int deleteEtpEmployeeViolationAnalysisById(Long id)
    {
        return etpEmployeeViolationAnalysisMapper.deleteEtpEmployeeViolationAnalysisById(id);
    }
}
